<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86186
  Date: 2021/1/11
  Time: 18:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新闻管理页面</title>
    <link rel="stylesheet" type="text/css" href="../css/css.css">
    <link rel="stylesheet" type="text/css" href="../css/amazeui.min.css">
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
</head>
<body>
<div id="pageAll">
    <div class="pageTop">
        <div class="page">
            <img src="../images/admin/coin11.png" /><span><a href="../manage/index.html" target="_top" >首页</a>&nbsp;-&nbsp;-</span>&nbsp;新闻管理
        </div>
    </div>

    <div class="page">
        <!-- user页面样式 -->
        <div class="connoisseur">
            <div class="conform">
                    <div class="cfD">
                        <a href="manage/newsAdd.jsp" target="main"><button class="userbtn" style="width: 100px; height: 35px">添加</button></a>
                    </div>
            </div>
            <!-- user 表格 显示 -->
            <div class="conShow">
                <table border="1" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="240px" class="tdColor tdC">ID</td>
                        <td width="750px" class="tdColor">新闻标题</td>
                        <td width="240px" class="tdColor">操作</td>
                    </tr>
                    <c:forEach items="${news}" var="n">
                    <tr height="40px" class="li">
                        <td>${n.enId}</td>
                        <td>${n.enTitle}</td>

                        <td>
                            <a href="../NewsShowServlet?enId=${n.enId}" >
                                <img class="operation" src="../images/admin/update.png">
                            </a>
                            &nbsp;&nbsp;
                               <a href="javascript:if(confirm('确定?'))location='../NewsDelServlet?enId=${n.enId}';" class="del">
                                   <img class="operatio ndelban" src="../images/admin/delete.png">
                               </a>
                        </td>
                    </tr>
                    </c:forEach>

                </table>
            </div>
            <!-- user 表格 显示 end-->


        </div>
        <!-- user页面样式end -->
        <div class="am-fr">
        <ul class="am-pagination">
        <li class="am-active"><a href="../NewsServlet?pageIndex=0">首页</a></li>
        <li><a href="../NewsServlet?pageIndex=${pageIndex-1}">上一页</a></li>
        <li><a href="../NewsServlet?pageIndex=${pageIndex+1}">下一页</a></li>
        <li><a href="../NewsServlet?pageIndex=${totalPages}">尾页</a></li>
    </ul>
        </div>
    </div>



</div>
</body>
</html>
